﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using MySql.Data.MySqlClient;

namespace Plazos
{
    class BD
    {
        private string server = "mysql13.000webhost.com";
        private string user = "a1939184_admin";
        private string password = "fundacionupla2015";
        private string db = "a1939184_plazos";

        // Feriados
        public void agregarFeriado(Feriados f)
        {
            NpgsqlConnection conn = conectar();
            string query = "INSERT INTO feriados(feriado) VALUES('08/12/2015')";
            NpgsqlCommand command = new NpgsqlCommand(query, conn);
            command.ExecuteNonQuery();
        }
        
        public int contarFeriados()
        {
            NpgsqlConnection conn = conectar();
            string query = "SELECT COUNT * from feriados";
            NpgsqlCommand command = new NpgsqlCommand(query, conn);
            int c = (int)command.ExecuteScalar();
            return c;
        }

        // Curso

    }
}
